/* 工具栏样式 */
.toolbar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}

.tool-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.tool-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.tool-btn.active {
  background: var(--primary-color);
  color: white;
}

/* 侧边面板样式 */
.side-panel {
  position: fixed;
  right: 64px;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  height: 80vh;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  z-index: 99;
}

.side-panel.active {
  display: flex;
}

.panel-header {
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.close-btn {
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px;
  transition: all 0.3s;
}

.close-btn:hover {
  color: #333;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

/* 修改表格列宽样式 */
.template-list th:first-child,
.template-list td:first-child {
  width: 60px;
  text-align: center;
}

.template-list th:nth-child(2),
.template-list td:nth-child(2) {
  width: auto;
}

.template-list th:last-child,
.template-list td:last-child {
  width: 140px;
  white-space: nowrap;
  text-align: right;
}

/* 添加主内容区域样式 */
.container {
  padding-right: 64px !important;
}
